﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Clipper
{
    public class WindowFactory
    {
        /// <summary>
        /// 创建对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static T CreateInstance<T>()
        {
            Type type = typeof(T);
            string assemblyName = type.Assembly.FullName;
            string className = type.FullName;

           return (T)Assembly.Load(assemblyName).CreateInstance(className);

        }
    }
}
